package com.yzt.redpack.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.yzt.redpack.R;

import com.yzt.zhuju.network.entity.dynamic.RedPkgUserBean;
import com.yzt.zhuju.widget.widget.ImageLoadManger;

/**
 * author : bob
 * date   : 2023/2/27
 * desc   : 转移主持人适配器
 */
public class RedPkgDetailAdapter extends BaseQuickAdapter<RedPkgUserBean, BaseViewHolder> {

    public RedPkgDetailAdapter() {
        super(R.layout.item_red_pkg_detail);
    }

    @Override
    protected void convert(BaseViewHolder holder, RedPkgUserBean item) {
        ImageLoadManger.loadIv(getContext(), item.getAvatar(), holder.findView(R.id.img_avatar));
        holder.setText(R.id.tv_name, item.getNickName())
                .setText(R.id.tv_time, item.getOpenTime())
                .setText(R.id.tv_coin, item.getCandyCoin() + "糖币")
                .setVisible(R.id.tv_best, item.isLargest());
    }
}